package code._13io.bytestream.in;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Arrays;

public class Demo {
    public static void main(String[] args) throws IOException {
        FileInputStream in = new FileInputStream("fileTest\\a.txt");
        byte[] bytes = new byte[1024];
        int readCount = in.read(bytes, 1, 3);
        System.out.println(Arrays.toString(bytes));
        //只输出要的那几个
        System.out.println(Arrays.toString(Arrays.copyOfRange(bytes,1,1+readCount)));
        in.close();
    }
}
